<?php
/*
 * Author:YangBo Created on 2009-2-10 04:35:18
 * 
 * as9
 * TODO:TODO
 * 
 * package_declaration
 * package_name
 * 
 */
 class ServiceUtil
 {
 	const SUCCESS = "success";
 	const FAILURE = "failure";
 	const ERROR   = "error";
 	
 	const ERROR_CODE_0x000000 = "Invalid parameters!";
 	
 	public static function getSuccessResult($info,$detail)
 	{
 		if($info)
 		{
 			return array("info"=>"$info","detail"=>"$detail");
 		}
 		return SUCCESS;
 	}
 	
 	public static function getFailureResult($info,$detail)
 	{
 		if($info)
 		{
 			return array("info"=>"$info","detail"=>"$detail");
 		}
 		return FAILURE;
 	}
 	
 	public static function getErrorResult($info,$detail,$errorID,$exception)
 	{
 		return array("info"=>"$info","detail"=>"$detail","errorID"=>"$errorID","exception"=>$exception);
 	}
 }
?>
